package uk.ac.aber.Blockmation.Actions;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import uk.ac.aber.Blockmation.MainFrame;

/**
 * 
 * @author tom, aron
 */

public class ActionCopyFrame extends AbstractAction {
	
    private MainFrame mainFrame;
    private String path = "../icons/CopyFrame.gif";

    public ActionCopyFrame(MainFrame mainFrame) {
        super("Copy Frame"); 
        this.mainFrame = mainFrame;
        
        // the below from settings class file or?!
        //putValue(SHORT_DESCRIPTION, tooltip);  // Will appear as tooltip text.
        //putValue(MNEMONIC_KEY, new Integer(mnemonic));
        
    }
        
    public void actionPerformed(ActionEvent e) {

    	mainFrame.setCopiedFrame(mainFrame.getPad().getImage());
    	return;
    	
    }
    
    public void setImage () {
        CreateImageIcon createImageIcon = new CreateImageIcon();
        putValue(SMALL_ICON, createImageIcon.create(path));
    }


}
